Represents a thread-safe last-in, first-out collection of objects.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ <HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True, _ ExternalThreading := True)> _ Public Class ConcurrentStack(Of T) _ Implements IProducerConsumerCollection(Of T), IEnumerable(Of T), _ ICollection, IEnumerable |
C# |
---|
[SerializableAttribute] [HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, ExternalThreading = true)] public class ConcurrentStack<T> : IProducerConsumerCollection<T>, IEnumerable<T>, ICollection, IEnumerable |
Type Parameters
- T
- Specifies the type of elements in the stack.
Remarks
All public and protected members of ConcurrentStack<(Of <(T>)>) are thread-safe and may be used
concurrently from multiple threads.
Inheritance Hierarchy
System..::.Object
System.Collections.Concurrent..::.ConcurrentStack<(Of <(T>)>)
System.Collections.Concurrent..::.ConcurrentStack<(Of <(T>)>)